<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>指令directive的controller属性</title>
		<script src="../org/angular.min.js" ></script>
	</head>
	<body>
		<div ng-app = "hd"> 
		    <my-cms></my-cms>
		</div> 
		<script>
			var m = angular.module('hd',[]);
			m.directive('myCms',[function(){
				return{ 
					restrict:"E",
					replace:true,
					templateUrl:'../link/controller-url.html',
					controller:['$scope',function($scope){
						$scope.data = [{id:1,name:"chen"},
						{id:2,name:"shao"},
						{id:3,name:"yang"}];
					}]
				}
			}]);
		</script>
	</body>
</html>